def reverse_string(s:str, goal:str):
    if len(s) != len(goal):
        return False
    else:
        return goal in (s + s)

print(reverse_string('abcd', 'cdab'))